<div class="venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_dateSession" style="">
    <div class="form-group"> 
        <div class="col-lg-3 col-md-3 col-sm-3 course-pdl column3"><label>Start date</label></div>
        <div class="col-lg-3 col-md-3 col-sm-3 course-pdl column3"><label>Start Time</label></div>
        <div class="col-lg-3 col-md-3 col-sm-3 course-pdl column3"><label>End Time</label></div>
        <div class="col-lg-3 col-md-3 col-sm-3 course-pdl column3"></div>        
    </div>

    <?php
    for ($dateIndex = 0; $dateIndex < count($dateSesion); $dateIndex++) {
        $dateSessionIs_flexible = ($dateSesion[$dateIndex]->is_flexible == 1) ? 1 : 0;
        $addClass = ($dateSesion[$dateIndex]->is_flexible == 1) ? '' : 'hastimePicker requiredfield';
        ?> 
        <div class="form-group">
            <div class="col-lg-3 col-md-3 col-sm-3 course-pdl column3">
                <input class="book-control requiredfield requiredfield" onpaste="return false;" onclick="hasDatepicker(this.id)" name="CourseBatcheDateSession[CourseBatche][<?php echo $batchIndex; ?>][ClassVenue][<?php echo $venueIndex; ?>][date][]" id="course_venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_daySession_date_<?php echo $dateIndex; ?>" type="text" placeholder="Date" value="<?php echo $dateSesion[$dateIndex]->date; ?>">
                <div class="errorMessage" id="error_venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_daySession_date_<?php echo $dateIndex; ?>" style="display:none">Schedule cannot be blank.</div>
            </div>
            <div class="col-lg-3 col-md-3 col-sm-3 course-pdl column3">
                <div class="input-append bootstrap-timepicker time-sin">
                    <input onblur="checkValueEmpty(this.id);" name="CourseBatcheDateSession[CourseBatche][<?php echo $batchIndex; ?>][ClassVenue][<?php echo $venueIndex; ?>][time_from][]" id="course_venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_daySession_time_from_<?php echo $dateIndex; ?>" type="text" onclick="hastimePicker(this.id)" onpaste="return false;" class=" add-on book-control time-sin <?php echo $addClass; ?>" value="<?php echo $dateSesion[$dateIndex]->time_from; ?>" onchange="timeCheck(this.id);">
                    <div class="errorMessage" id="error_course_venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_daySession_time_from_<?php echo $dateIndex; ?>" style="display:none">Start time cannot be blank.</div>
                </div> 
            </div>
            <div class="col-lg-6 col-md-6 col-sm-6 course-pdr column6">
                <div class="col-lg-7 col-md-7 col-sm-7 column6">
                    <div class="input-append bootstrap-timepicker time-sin">
                        <input name="CourseBatcheDateSession[CourseBatche][<?php echo $batchIndex; ?>][ClassVenue][<?php echo $venueIndex; ?>][time_to][]" id="course_venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_daySession_time_to_<?php echo $dateIndex; ?>" onclick="hastimePicker(this.id)" onpaste="return false;" onblur="checkValueEmpty(this.id);" class="<?php echo $addClass; ?> add-on book-control time-sin" type="text" size="10" value="<?php echo $dateSesion[$dateIndex]->time_to; ?>" onchange="timeCheck(this.id);">
                        <div class="errorMessage" id="error_course_venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_daySession_time_to_<?php echo $dateIndex; ?>" style="display:none">End time cannot be blank.</div>
                        <div class="errorMessage" id="endTime_course_venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_daySession_time_to_<?php echo $dateIndex; ?>" ></div>
                    </div>
                </div>

                <div class="col-lg-5 col-md-5 col-sm-5 column5"><div class="batch-flexible">
                        <input <?php if ($dateSesion[$dateIndex]->is_flexible) { ?>checked="checked"<?php } ?> type="checkbox" class="isdaySesionFlexble" value="<?php echo $dateSesion[$dateIndex]->is_flexible; ?>" id="course_venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_daySession_is_flexible_<?php echo $dateIndex; ?>" onclick="datedaySesionisFlexble(this.id)" name="CourseBatcheDaySession[CourseBatche][<?php echo $batchIndex; ?>][ClassVenue][<?php echo $venueIndex; ?>][is_flexible][]">
                        <label for="course_venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_daySession_is_flexible_<?php echo $dateIndex; ?>"> Flexible </label><input type="hidden" name="CourseBatcheDateSession[CourseBatche][<?php echo $batchIndex; ?>][ClassVenue][<?php echo $venueIndex; ?>][is_flexiblevalue][]" value="<?php echo $dateSessionIs_flexible; ?>" id="course_venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_daySession_is_flexiblevalue_<?php echo $dateIndex; ?>">
                    </div></div> </div> </div>
    <?php } ?>

</div>